<div class="box">
    
  <div class="box-header">

    <div class="row">
        <div class="col-sm-5">
            <ob_link><a class="btn" href="{:url('advertisementAdd')}"><i class="fa fa-plus"></i> 新 增</a></ob_link>
            <!-- &nbsp;
            <ob_link><a class="btn export" url="{:url('export')}"><i class="fa fa-download"></i> 导 出</a></ob_link> -->
        </div>
        
        <div class="col-sm-7">
            <div class="box-tools search-form pull-right">
                <form action="{:url('advertisementList')}" method="get" class="form-inline">
                    <div class="form-group">
                        <select name="position" class="form-control">
                            <option value="">全部位置</option>
                            {volist name="position_options" id="option"}
                            <option value="{$key}" {if condition="$Request.param.position == $key"}selected{/if}>{$option}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="form-group">
                        <select name="status" class="form-control">
                            <option value="">全部状态</option>
                            {volist name="status_options" id="option"}
                            <option value="{$key}" {if condition="$Request.param.status == $key"}selected{/if}>{$option}</option>
                            {/volist}
                        </select>
                    </div>
                    <button type="submit" class="btn btn-info btn-flat"><i class="fa fa-search"></i></button>
                </form>
           </div>
        </div>
    </div>
    
  </div>
    
    
  <div class="box-body table-responsive">
    <table  class="table table-bordered table-hover table-striped">
      <thead>
      <tr>
          <th>ID</th>
          <th>广告标题</th>
          <th>广告位置</th>
          <th>排序</th>
          <th>状态</th>
          <th>点击次数</th>
          <th>创建时间</th>
          <th>操作</th>
      </tr>
      </thead>
      
      {notempty name='list'}
        <tbody>
            {volist name='list' id='vo'}
                <tr>
                  <td>{$vo.id}</td>
                  <td>{$vo.title}</td>
                  <td>{$position_options[$vo.position] ?? '未知'}</td>
                  <td>{$vo.sort}</td>
                  <td>
                      {if condition="$vo.status eq 1"}
                          <span class="label label-success">启用</span>
                      {else/}
                          <span class="label label-danger">禁用</span>
                      {/if}
                  </td>
                  <td>{$vo.click_count|default=0}</td>
                  <td>{$vo.create_time}</td>
                  <td class="text-center">
                      <ob_link><a href="{:url('advertisementEdit', array('id' => $vo['id']))}"><span class='badge bg-green'>编 辑</span></a></ob_link>
                      &nbsp;
                      <!-- <ob_link><a href="{:url('advertisementStatistics', array('id' => $vo['id']))}"><span class='badge bg-blue'>统 计</span></a></ob_link>
                      &nbsp; -->
                      <ob_link><a class="confirm ajax-get"  href="{:url('advertisementDel', array('id' => $vo['id']))}"><span class='badge bg-red'>删 除</span></a></ob_link>
                  </td>
                </tr>
            {/volist}
        </tbody>
        {else/}
        <tbody><tr class="odd"><td colspan="8" class="text-center" valign="top">{:e(config_value('empty_list_describe', 'Oh! 暂时还没有数据~'))}</td></tr></tbody>
      {/notempty}
    </table>
  </div>

  <div class="box-footer clearfix text-center">
      {$list->render()|raw}
  </div>

</div>